single responsibility principle swift